using System;
using System.Collections.Generic;

namespace Ghasam.Business.Domain.Entity
{
    /// <summary>
    /// Loan object for NHibernate mapped table Loan.
    /// </summary>
    [Serializable]
    public class Loan
    {


        private Employee _Employee;
        private System.Int32? _LoanAmount;
        private System.Int32? _LoanPaymentPeriod;
        private System.DateTime? _StartDate;
        private System.DateTime? _EndDate;
        private System.DateTime? _LoanDueDate;
        private IList<AdjustmentPayment> _AdjustmentPayments = new List<AdjustmentPayment>();

        public Loan()
        {
        }

        public virtual int Id { get; set; }

        public virtual Employee Employee
        {
            get { return _Employee; }
            set { _Employee = value; }
        }

         public virtual System.Int32? LoanAmount {
             get { return _LoanAmount; }
             set { _LoanAmount = value;}
         }

         public virtual System.Int32? LoanPaymentPeriod {
             get { return _LoanPaymentPeriod; }
             set { _LoanPaymentPeriod = value;}
         }

         public virtual System.DateTime? StartDate {
             get { return _StartDate; }
             set { _StartDate = value;}
         }

         public virtual System.DateTime? EndDate {
             get { return _EndDate; }
             set { _EndDate = value;}
         }

         public virtual System.DateTime? LoanDueDate {
             get { return _LoanDueDate; }
             set { _LoanDueDate = value;}
         }

         public virtual IList<AdjustmentPayment> AdjustmentPayments{
             get { return _AdjustmentPayments; }
             set { _AdjustmentPayments = value; }
         }


        public override int GetHashCode()
        {
            return Id.GetHashCode();
        }

     }
}
